package is.api.demo.isgateway.support;

import java.util.Objects;

/**********************************************************************
 * &lt;p&gt;文件名：RestResponseCodeEnum.java &lt;/p&gt;
 * &lt;p&gt;文件描述：2.0标准接口响应报文状态码枚举(描述该文件做什么) 
 * @project_name：rest-api-demo
 * @author zengshunyao
 * @create 2025/11/27 17:01
 * @history
 * @department：政务事业部
 * Copyright ChengDu Funi Cloud Code Technology Development CO.,LTD 2014 
 *                    All Rights Reserved.
 */
public enum RestResponseCodeEnum {
    SUCCESS("success"),
    //ERROR("error"),
    FAIL("fail");
    //接口处理成功或失败标识(success、fail)
    private final static String SUCCESS_TEXT = "success";
    // 提示信息
    private final static String MESSAGE_TEXT = "成功";

    private String status;

    RestResponseCodeEnum(String status) {
        this.status = status;
    }

    /**
     * 是否成功
     *
     * @param status
     * @return
     */
    public static boolean isSuccess(String status) {
        return Objects.equals(SUCCESS_TEXT, status);
    }
}
